package com.ragdollcat.thirdaicodegenerate.ai;

import com.ragdollcat.thirdaicodegenerate.util.SpringBeanUtil;
import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.service.AiServices;
import org.springframework.stereotype.Component;

@Component
public class AiCodeRouterFactory {

//    @Resource
//    private ChatModel chatModel;

    public AiCodeRouterService aiCodeRouterService(){
        ChatModel routingChatModel = SpringBeanUtil.getBean("routingChatModel", ChatModel.class);
        return AiServices.builder(AiCodeRouterService.class)
                .chatModel(routingChatModel)
                .build();
    }

}
